/* Janus Chat - Version 1.0
 * Authors: Matthew Perry
 *          Michael Freid
 *          Marc Latou
 *          Richard Lee
 *
 * The Janus Chat Client is a highly secured
 * peer-to-peer chat client designed to facilitate
 * the transfer of sensitive data or as a communication
 * medium for the extra paranoid
 *
 * This is the header for a class to store the ipaddress
 * and port number of the clients in a chatroom of a server */

#ifndef CLIENTENTRY_H
#define CLIENTENTRY_H

#include <string>
using std::string;

class ClientEntry
{
    private:
        string myIP;
        int myPort;

    public:
        ClientEntry( const string& ip, int port )
        {
            myIP = ip;
            myPort = port;
        }

        string getIP() const { return myIP; }
        int getPort() const { return myPort; }

        bool operator==( const ClientEntry& ce ) const
        {
            return ( myIP == ce.myIP && myPort == ce.myPort );
        }

        bool operator<( const ClientEntry& ce ) const
        {
            return ( myIP < ce.myIP || myPort < ce.myPort );
        }
};

#endif //CLIENTENTRY_H
